package com.atguigu.gulimall.order.service;

import com.atguigu.common.to.SeckillOrderTo;
import com.atguigu.gulimall.order.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author zhangjianyou
 * @email 1844897920@qq.com
 * @date 2022-06-01 16:01:29
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo toTrade() throws ExecutionException, InterruptedException;

    OrderSubmitResponseVo submitOrder(OrderSubmitVo orderSubmitVo);

    OrderEntity getOrderEntityByOrderSn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    PayVo getPayVoWithOrderSn(String orderSn);

    PageUtils getOrderAndOrderItemList(Map<String, Object> params);

    String updateOrderStatus(PayAsyncVo payAsyncVo);

    void createOrder(SeckillOrderTo seckillOrderTo);
}

